package com.mg.common.vo;

import lombok.Data;

/**
 * @param <T> 封装数据类型
 * @author tomyeung-李尐达
 */
@Data
public class ResponsePageResult<T> {
    private T data;
    private Long total;

    public ResponsePageResult() {
    }

    public ResponsePageResult(T data) {
        this.data = data;
    }

    public ResponsePageResult(T data, Long total) {
        this.data = data;
        this.total = total;
    }

    public static <T> ResponsePageResult page(T date, Long total) {
        return new ResponsePageResult(date, total);
    }

    public static <T> ResponsePageResult page(T date) {
        return new ResponsePageResult(date);
    }

}


